1. Field of the Invention
The present invention relates to a digital video signal processing apparatus for compression-encoding a digital video signal as blocks, a method thereof, and a digital video signal reproducing apparatus thereof.
2. Description of the Related Art
A digital video tape recorder that records/reproduces a digital video signal has been practically used (hereinafter the digital video tape recorder is referred to as DVTR). In the DVTR, digital video data is compressed, encoded with error correction code, and then recorded to a record medium such as a magnetic tape.
FIG. 1 is a block diagram showing an example of the structure of the DVTR. For example, digital video data as record data is supplied to a BRR (Bit Rate Reduction) encoder 101 through an interface 100. The BRR encoder 101 compresses and encodes the record data corresponding to for example DCT (Discrete Cosine Transform) method. The encoded record data is supplied to an error correction code encoder 102 that encodes the record data with for example product code.
The error correction code encoder 102 is connected to a RAM (not shown). Data supplied to the error correction code encoder 102 is written to the RAM. The error correction code encoder 102 generates outer code parity for the record data written to the RAM in the column direction with Reed-Solomon code and likewise generates inner code parity thereof in the line direction. Thus, the error correction code encoder 120 encodes the record data with product code. The data size of product code as inner code and outer code is referred to as error correction block.
The error correction encoder 102 reads the encoded record data from the RAM in the row direction and supplies the resultant data to a record driving portion 103 that includes a recording amplifier. Thereafter, a magnetic head 104 records the data received from the record driving portion 104 to a magnetic tape 105.
At this point, the data is recorded corresponding to a helical scan method of which the magnetic head 104 is disposed on a rotating drum and the magnetic head 104 forms slanted tracks on the magnetic tape 105. In addition, the data is recorded corresponding to an azimuth recording method of which azimuth angles of adjacent two tracks are different.
FIGS. 2A, 2B, 3A, and 3B show examples of structures of the above-described error correction blocks. In these examples, data of one frame is composed of 12 tracks formed on a magnetic tape 105. In addition, a segment is composed of a pair of adjacent two tracks with different azimuth angles. Thus, one frame is composed of 12 tracks (=six segments). These segments are assigned segment numbers 0 to 5.
In the example of video data shown in FIGS. 2A and 2B, one track of 12 frames forms one error correction block shown in FIG. 2B. For example, data of each column is encoded in the direction of arrow b with (250, 226) Reed-Solomon code. Thus, outer code parity of 24 bytes is formed. In addition, the resultant video data and the outer code parity are encoded in the direction of arrow a with (229, 217) Reed-Solomon code. Thus, inner code parity of 12 bytes is formed. Sync data of two bytes and ID of two bytes are placed at the beginning of each data row.
FIGS. 3A and 3B show an example of the structure of an error correction block of audio data. As shown in FIG. 3A, in audio data, one error correction block is composed of six tracks in 12 tracks of one frame. For example, audio data composed of a data array of 217 bytesxc3x9712 bytes is encoded in the direction of arrow b with (24, 12) Reed-Solomon code. Thus, outer code parity of 12 bytes is formed. In addition, the resultant data and the outer code parity are encoded in the direction of arrow a with for example (229, 217) Reed-Solomon code. Thus, inner code parity of 12 bytes is generated. Moreover, sync data and ID are placed at the beginning of each data row.
FIG. 4 is a schematic diagram showing an example of the structure of one sync block of an error correction block of video data. Referring to FIG. 4, the first two bytes are sync data. The sync data is followed by ID of two bytes. The ID represents a unique number of the current sync block in one track (segment number) or an unique sync block number. The ID is followed by video data of 217 bytes (or outer code parity) and inner code parity. Record data on the magnetic tape is composed of a sequence of sync blocks.
Data recorded on the magnetic tape 105 is read as reproduction data by a magnetic head 106. The reproduction data is supplied to an inner code decoder 108 through an equalizer 107. The inner code decoder 108 decodes the reproduction data with inner code using a RAM 109 connected thereto. In other words, the inner code decoder 108 corrects an error of each row corresponding to inner code parity placed thereto. When the number of errors exceeds the error correction capability of the code and errors remain, the inner code decoder 109 sets an error flag to all symbols of the row. The inner code decoder 108 writes error corrected reproduction data to the RAM 109.
The inner code decoder 108 reads the error corrected reproduction data in the column direction of the product code from the RAM 109 and arranges the data. sequence in the direction of the outer code. The inner code decoder 108 supplies the resultant reproduction data to an outer code decoder 110. The outer code decoder 110 corrects an error of data with the outer code. In other words, the outer code decoder 110 corrects an error of each column of the data corresponding to outer code parity placed thereto. The outer code decoder 110 uses outer code and the error flag placed to each symbol by the inner code decoder 108. The outer code decoder 110 writes the error corrected reproduction data to a RAM 111 connected thereto.
As the error corrected result, the outer code decoder 110 sets an error flag to each symbol. The error flag represents that an error remains in the case that the number of errors exceeds the error correction capability of the code and the outer code decoder 110 cannot correct the errors of the data.
The outer code decoder 110 reads the resultant reproduction data that has been corrected with outer code in the row direction from the RAM 111. Thus, the read direction that has been changed in the RAM 109 is restored to the original read direction.
The resultant reproduction data that has been corrected with inner code and outer code is supplied to a BRR decoder 112. The BRR decoder 112 decodes the reproduction data that has been compressed and encoded. Output data of the BRR decoder 112 is supplied as digital video data to the outside of the DTVR through an interface 113.
Data with the error flag that represents an error thereof has not been corrected by the outer code decoder 110 is concealed corresponding to for example interpolating method.
As described above, in the DVTR, to effectively record/reproduce data to/from a record medium, when a video signal is recorded, it is compressed and encoded corresponding to for example DCT method. In this method, video data is divided into DCT blocks each of which is composed of 8xc3x978 pixels. DCT coefficients are obtained for each DCT block. In addition, corresponding to the obtained DCT coefficients, data is compressed and encoded. In such a compressing and encoding method, the size of data that has been compressed varies corresponding to DCT coefficients of each DCT block. In other words, the required data amount largely varies corresponding to the complexity of an image that data of the DCT block represents as shown in FIGS. 5A and 5B.
In FIG. 5A, each of areas A to E surrounded by dotted lines corresponds to DCT blocks for one sync block. In FIGS. 5B and similar drawings, the left side represents a low frequency component side (including DC component) of DCT coefficients, whereas the right side represents a high frequency component side. In these drawings, A to E correspond to areas A to E, respectively. As are clear from FIGS. 5A and 5B, since the image in the area A is complicated, DCT coefficients widely distribute from low frequency components to high frequency components. Thus, the data amount of the area A that has been compressed and encoded is large. On the other hand, since the area D is a simple image, DCT coefficients distribute in only low frequency components. Thus, the data amount of the area D that has been compressed and encoded is small. Consequently, the data amount of an image that has been compressed and encoded depends on the complexity thereof.
Data that has been compressed and encoded are placed in sync blocks so as to form error correction blocks. However, as described above, since the data amount of the compressed data largely varies corresponding to the complexity of the image, as with the example of the area A, the data amount may exceed one sync block. In contrast, as with the area D, the data amount may be smaller than one sync block. In this case, the sync block may have a large blank portion.
Conventionally, when data cannot be placed in one sync block, the data is discarded in the order of higher frequency components that are not remarkable portions of the image. Thus, since higher frequency components of DCT coefficients are lost, an image in high quality cannot be reproduced. To effectively place data and obtain a reproduction image in high quality, a method for packing a plurality of sync blocks has been proposed. In this method, for example five sync blocks are packed as one unit. The packed unit is referred to as a packing unit. Data that cannot be placed in one sync block is temporarily placed in another sync block that has a blank portion of the same packing unit. In this case, data is placed in the order of DC component and lower frequency components that are remarkable in the image.
FIGS. 6A and 6B show an example of a method for placing such data to another sync block. In FIG. 6A, it is assumed that the first row represents the length of one sync block. In an area A (on the second row), data elements A6 to A9 protrude from one sync block. In an area C (on the fourth row), data elements C7 to C9 protrude from one sync block. In an area E (on the sixth row), a data element E6 protrudes from one sync block. In contrast, an area B (on the third row) and an area D (on the fifth row) have blank portions. To equally place data elements in five sync blocks of one packing unit, data elements of individual areas are arranged as shown in FIG. 6B.
The compressed and encoded data is arranged for each sync block, encoded with error correction code, and then recorded to the magnetic tape 105. Thus, even if the data that has been compressed and encoded becomes larger than one sync block, the probability of which data is discarded is very low. Consequently, an image in high quality can be obtained.
Now, it is considered that such data is read and reproduced from the magnetic tape 105. In the normal reproducing mode whose speed is the same as that in the recording mode, all data of a packing unit composed of five sync blocks can be read. Thus, the BRR decoder 112 can completely decode data including data elements temporarily placed in other sync blocks of the same packing unit.
In other words, before the BRR decoder 112 decodes such data, it restores data elements that have been temporarily placed in other sync blocks to the original sync blocks. This process is referred to as unpacking process. The unpacking process is performed for example after the outer code decoder 110 corrects error of data with outer code. Thus, the BRR decoder 112 decodes each sync block that has been unpacked.
However, in a variable-speed reproducing mode whose reproducing speed is different from the recording speed, five sync blocks of a packing unit cannot be securely read. In this case, the BRR decoder 112 cannot correctly decode data that has been compressed and encoded.
In the variable-speed reproducing mode, the relative speed between the magnetic head 106 and the magnetic tape 105 varies from that in the normal reproducing mode. Thus, the tracing angle of which the magnetic head 106 traces a track formed on the magnetic tape 105 varies. Thus, the magnetic head 106 traces a plurality of tracks at a time.
FIG. 7 is a schematic diagram showing the structure of one track. One track is composed of an audio track portion of 16 sync blocks and two video track portions of 127 sync blocks and 123 sync blocks. The audio track portion is sandwiched with the two video track portions. FIGS. 8 to 11 are schematic diagrams showing tracing relations between tracks and the magnetic head 106 in the normal reproducing mode and variable speed reproducing modes of 2-times speed, 10-times speed, and 50-times speed. In the normal reproducing mode shown in FIG. 8, the magnetic head 106 accurately traces a relevant track and thereby reads all 250 sync blocks of video data on the track.
FIG. 12 is a schematic diagram showing an unpacking process of which the packing unit shown in FIG. 6B is unpacked in the normal reproducing mode. In FIG. 12, data elements in the areas A, C, and E that have been temporarily placed in the areas B and D are restored to the original areas (thus, the unpacking process is performed). Since DCT coefficients in these areas are restored, data can be normally decoded. Thus, an image in high quality can be reproduced.
On the other hand, in the variable-speed reproducing modes, as shown in FIGS. 9 to 11, the magnetic head 106 traces a plurality of tracks at a time. As shown in FIGS. 9, 10, and 11, the magnetic head 106 traces 2 tracks, 10 tracks, and 50 tracks with the same azimuth angle in the 2-times speed reproducing mode, the 10-times speed reproducing mode, and the 50-times speed reproducing mode, respectively.
When data is reproduced from a plurality of tracks, a sync block of another packing unit may mix with the current packing unit as one packing unit. When the BRR decoder 112 decodes high frequency components in the state that a sync block of another packing unit mixes with the current packing unit, improper data is decoded. Thus, an image cannot be correctly reproduced.
To solve such a problem, in the variable reproducing modes including a low-speed reproducing mode, all high frequency components that have been placed in sync blocks of another packing unit are discarded. The resultant data is decoded for each sync block containing only low frequency components. Thus, in the variable-speed reproducing modes, since high frequency components are lost, an image in deteriorated quality is reproduced.
FIG. 13 is a schematic diagram showing such a situation. In this example, the packing unit shown in FIG. 6B mixes with a sync block 300 of another packing unit. When the packing unit shown in FIG. 13 is unpacked in the same manner as the packing unit in the normal reproducing mode shown in FIG. 12, instead of data elements of the areas A, C, and E that protrude from one sync block, data elements of the sync block 300 are decoded. Thus, the data cannot be properly decoded. Conventionally, data elements 301 of another packing unit, a sync block 302 that contains data elements of the current packing unit, and a sync block 303 that contains DCT coefficients are discarded.
In a low-speed reproducing mode as a variable reproducing mode, since most sync blocks are successively read, the probability of which five sync blocks of one packing unit are collectively obtained is high. However, there is a possibility of which the current packing unit mixes with a sync block of another packing unit even if the probability is low. Conventionally, to prevent such a rare situation from taking place, all high frequency components that have been placed in sync blocks of another packing unit are discarded. Thus, an image with deteriorated quality is obtained.
On the other hand, in high-speed reproducing modes of 2-times speed, 10-times speed, 50-times speed, and so forth, five sync blocks of one packing unit may be correctly obtained to some extent. For example, in the 2-times speed reproducing mode, since two tracks with the same azimuth angle are read at a time, it can be expected that 125 sync blocks will be read per track. In this case, it can be said that the probability of which a packing unit of five sync blocks is read is high. In this case, with all data elements that have been placed in sync blocks of the current packing unit, a decompressing process can be performed. Thus, an image in higher image quality can be obtained.
However, in the 50-times speed reproducing mode, since 50 tracks with the same azimuth angle are read at a time. With 250 sync blocks/50 tracks, only five sync blocks are read per track. In this case, since there is a probability of which the current packing unit mixes with data elements of sync blocks of another packing unit, when data elements that have been placed in other sync blocks are discarded, it can be expected that an image in higher image quality will be obtained.
When a process corresponding to a reproducing speed is performed, a reproduced image in high quality can be adaptively obtained. However, conventionally, since data elements that have been placed in other sync blocks are unconditionally discarded, an image in deteriorated quality is obtained.
Therefore, an object of the present invention is to provide a digital video signal processing apparatus, a method thereof, and a digital video signal reproducing apparatus that perform a decoding process for data that has been compressed and encoded using also high frequency components in a variable-speed reproducing mode in the case that data is handled with a packing unit composed of a plurality of sync blocks so as to reproduce an image in high quality.
A first aspect of the present invention is a digital video signal processing apparatus for reproducing data that has been compressed and encoded for each block, processing the encoded data, and packing the encoded data of a predetermined number of sync blocks as a unit in such a manner that encoded data that cannot be placed in one sync block is placed in another sync block of the unit, the apparatus comprising a detecting means for detecting whether or not each unit of reproduction data mixes with a sync block of another unit,
a unpacking means for restoring encoded data placed in another sync block to the original sync block when the current unit does not mix with a sync block of another unit and for invalidating sync blocks when the current unit mixes with a sync block of the another unit, and
a decoding means for decoding each sync block of digital video data that is output from the unpacking means.
A second aspect of the present invention is a digital video signal processing apparatus for reproducing data that has been compressed and encoded with error correction code for each block, processing the encoded data, and packing the encoded data of a predetermined number of sync blocks as a unit in such a manner that encoded data that cannot be placed in one sync block is placed in another sync block of the unit, the apparatus comprising error correcting means for performing an error correcting process, a memory for storing data that has been error-corrected by the error correcting means, a memory controlling means for receiving data to be written to the memory and data that is read from the memory, and performing an access controlling process for the data to the memory, a detecting means for detecting whether or not the current unit mixes with a sync block of another unit corresponding to the data supplied to the memory controlling means, the data that is written to the memory, and the data that is read from the memory, an unpacking means for restoring encoded data placed in another sync block to the original sync block when the current unit does not mix with a sync block of another unit and for invalidating sync blocks when the current unit mixes with a sync block of the another unit, and a decoding means for decoding each sync block of digital video data that is output from the unpacking means.
A third aspect of the present invention is a digital video signal reproducing apparatus having a digital video signal processing apparatus for reproducing data that has been compressed and encoded for each block, processing the encoded data, and packing the encoded data of a predetermined number of sync blocks as a unit in such a manner that encoded data that cannot be placed in one sync block is placed in another sync block of the unit, the digital video signal reproducing apparatus comprising a detecting means for detecting whether or not each unit of reproduction data mixes with a sync block of another unit, an unpacking means for restoring encoded data placed in another sync block to the original sync block when the current unit does not mix with a sync block of another unit and for invalidating sync blocks when the current unit mixes with a sync block of the another unit, and a decoding means for decoding each sync block of digital video data that is output from the unpacking means.
A fourth aspect of the present invention is a digital video signal reproducing apparatus having a digital video signal processing apparatus for reproducing data that has been compressed and encoded with error correction code for each block, processing the encoded data, and packing the encoded data of a predetermined number of sync blocks as a unit in such a manner that encoded data that cannot be placed in one sync block is placed in another sync block of the unit, the digital video signal reproducing apparatus comprising an error correcting means for performing an error correcting process, a memory for storing data that has been error-corrected by the error correcting means, a memory controlling means for receiving data to be written to the memory and data that is read from the memory, and performing an access controlling process for the data to the memory, a detecting means for detecting whether or not the current unit mixes with a sync block of another unit corresponding to the data supplied to the memory controlling means, the data that is written to the memory, and the data that is read from the memory, an unpacking means for restoring encoded data placed in another sync block to the original sync block when the current unit does not mix with a sync block of another unit and for invalidating sync blocks when the current unit mixes with a sync block of the another unit, and a decoding means for decoding each sync block of digital video data that is output from the unpacking means.
A fifth aspect of the present invention is a digital video signal processing method for reproducing data that has been compressed and encoded for each block, processing the encoded data, and packing the encoded data of a predetermined number of sync blocks as a unit in such a manner that encoded data that cannot be placed in one sync block is placed in another sync block of the unit, the method comprising the steps of (a) detecting whether or not each unit of reproduction data mixes with a sync block of another unit, (b) restoring encoded data placed in another sync block to the original sync block when the current unit does not mix with a sync block of another unit and for invalidating sync blocks when the current unit mixes with a sync block of the another unit, and (c) decoding each sync block of digital video data that is output at step (b).
A sixth aspect of the present invention is a digital video signal processing method for reproducing data that has been compressed and encoded with error correction code for each block, processing the encoded data, and packing the encoded data of a predetermined number of sync blocks as a unit in such a manner that encoded data that cannot be placed in one sync block is placed in another sync block of the unit, the method comprising the steps of (a) performing an error correcting process, (b) storing data that has been error-corrected at step (a), (c) receiving data to be written to the memory and data that is read from the memory, and performing an access controlling process for the data to the memory, (d) detecting whether or not the current unit mixes with a sync block of another unit corresponding to the data supplied at step (c), the data that is written to the memory, and the data that is read from the memory, (e) restoring encoded data placed in another sync block to the original sync block when the current unit does not mix with a sync block of another unit and for invalidating sync blocks when the current unit mixes with a sync block of the another unit, and (f) decoding each sync block of digital video data that is output at step (e).
As described above, data that has been compressed and encoded as each block is packed as each unit composed of a plurality of sync blocks. When encoded data elements cannot be placed in one sync block, the remaining data elements are placed in other sync blocks of the unit. It is determined whether or not each unit of reproduction data mixes with data elements of sync blocks of another unit. When the current unit does not mix with data elements of sync blocks of another unit as the determined result, data elements placed in other sync blocks are restored to the original sync blocks. When the current unit mixes with data elements of sync blocks of another unit as the determined result, data elements placed in other sync blocks are discarded. When data that has been compressed and encoded is decoded, an image deterioration due to the mixture of data elements of the current unit and another unit can be suppressed.
These and other objects, features and advantages of the present invention will become more apparent in light of the following detailed description of a best mode embodiment thereof, as illustrated in the accompanying drawings.